function back() {
	history.back();
}
var time = new Date();
var token = sessionStorage.getItem("token");
var appid = sessionStorage.getItem("appid");
var ID1 = sessionStorage.getItem("postID");
var username = sessionStorage.getItem("username");
var postname = sessionStorage.getItem("postname");
var vue = new Vue({
	el: "body",
	data: {
		commlist: [],
		comm: "",
		isloading: true
	},
	created: function() {
		this.getList();
	},
	methods: {
		getList: function() {
			$.ajax({
				type: 'get',
				url: 'http://v2.mashupcloud.cn/SQL/get_comment/',
				data: {
					appid: appid,
					token: token,
					name: 'get_comment',
					_v1: ID1, //鍙傛暟1  _v3,_v4 .......
				},
				success: function(json) {
					console.log("json==" + json);
					vue.commlist = JSON.parse(json)[2];
					vue.isloading = false;
					console.log(vue.commlist);
				},
				error: function(json) {
					console.log("err:" + json);
				}
			});
		},
		addcomment: function() {
			//			var username = sessionStorage.getItem("username");
			if (username == null) {
				location.href = "../load/load.html";
			} else {
				var nowTime = time.getFullYear() + "/";
				nowTime += time.getMonth() + "/";
				nowTime += time.getDate() + " ";
				nowTime += time.getHours() + ":";
				nowTime += time.getMinutes() + ":";
				nowTime += time.getSeconds();
				$.ajax({
					type: 'get',
					url: 'http://v2.mashupcloud.cn/SQL/add_comment/',
					data: {
						appid: appid,
						token: token,
						name: 'add_comment',
						_v1: ID1, //参数1  _v3,_v4 .......
						_v2: vue.comm, //参数1  _v3,_v4 .......
						_v3: username, //参数1  _v3,_v4 .......
						_v4: postname, //参数1  _v3,_v4 .......
						_v5: nowTime, //参数1  _v3,_v4 .......
					},
					success: function(json) {
						console.log("json==" + json);
						vue.comm = "";
						vue.getList();
					},
					error: function(json) {
						console.log("err:" + json);
					}
				});
			}
		}
	}
})